A flag is made of three horizontal strips of fabric, each of a solid color, either red, white, blue or green. If no two adjacent strips can be the same color, how many distinct flags are possible? These two flags are different.

[asy]draw((0,0)--(0,6),linewidth(1));
filldraw((0,3)--(4,3)--(4,4)--(0,4)--(0,3)--cycle,white);
filldraw((0,4)--(4,4)--(4,5)--(0,5)--(0,4)--cycle,red);
filldraw((0,5)--(4,5)--(4,6)--(0,6)--(0,5)--cycle,green);
filldraw(circle((0,6),1/6),white);
label("Green",(2,5.5));
label("Red",(2,4.5));
label("White",(2,3.5));

draw((5,0)--(5,6),linewidth(1));
filldraw((5,3)--(9,3)--(9,4)--(5,4)--(5,3)--cycle,green);
filldraw((5,4)--(9,4)--(9,5)--(5,5)--(5,4)--cycle,red);
filldraw((5,5)--(9,5)--(9,6)--(5,6)--(5,5)--cycle,white);
filldraw(circle((5,6),1/6),white);
label("White",(7,5.5));
label("Red",(7,4.5));
label("Green",(7,3.5));
[/asy]
We can choose the middle color for the flag in 4 ways, then choose the top color in 3 ways, and finally choose the bottom color in 3 ways (the only restriction is that the top and bottom colors are both different from the middle color).  This leads to a total of $4\cdot 3\cdot 3 = \boxed{36}$ possible flags.